<?php

class Zend_View_Helper_Datetime extends Zend_View_Helper_Abstract {

    public function datetime($unixTimestamp = "") {
        if($unixTimestamp != "") { 
            return $this->prepareDateTimeFromTimestamp($unixTimestamp);
        } else {
            return "";
        }
    }

    public function prepareDateTimeFromTimestamp($unixTimestamp) {
        $dateTimeLocalization = Zend_Registry::get('dateTimeLocalization');
        $locale = new Zend_Locale($dateTimeLocalization->localization);
        $date = new Zend_Date($unixTimestamp, false, $locale);
        $datetime = $date->toString($dateTimeLocalization->timeformat) . "<br/> " . $date->toString($dateTimeLocalization->dateformat);
        return $datetime;
    }

}

?>